import { defineConfig } from '@ice/app';
import {
  presetAttributify,
} from 'unocss';
import Unocss from '@ice/plugin-unocss';
import auth from '@ice/plugin-auth';
import request from '@ice/plugin-request';
import store from '@ice/plugin-store';
import jsxPlus from '@ice/plugin-jsx-plus';
// The project config, see https://v3.ice.work/docs/guide/basic/config
const minify = process.env.NODE_ENV === 'production' ? 'swc' : false;
export default defineConfig(() => ({
  minify,
  server: {
    onDemand: true,
    format: 'esm',
  },
  plugins: [auth(), request(), store(),
    jsxPlus(),
    Unocss({
      presets: [presetAttributify()],
    })],
}));
